<template>
  <view>
    <u-navbar :title="$t('关于我们')"></u-navbar>
    <view class="top">
      <view class="box">
        <image :src="logo" mode=""></image>
        <view class="tit">{{ appName }}</view>
      </view>
    </view>
    <view class="box1">
      <!-- #ifdef APP-PLUS -->
      <view class="list">
        <view>{{$t('检查更新')}}</view>
        <u-icon name="arrow-right"></u-icon>
      </view>
      <!-- #endif -->
      <!-- <view class="list">
				<view>问题反馈</view>
				<u-icon name="arrow-right"></u-icon>
			</view> -->
      <view class="list" @click="$.to('/pages/my/agreement?type=user_agreement')">
        <view>{{$t('用户协议')}}</view>
        <u-icon name="arrow-right"></u-icon>
      </view>
      <view class="list" @click="$.to('/pages/my/agreement?type=privacy_policy')">
        <view>{{$t('隐私政策')}}</view>
        <u-icon name="arrow-right"></u-icon>
      </view>
      <view class="list" @click="$.to('/pages/my/agreement?type=ertong')">
        <view>{{$t('儿童个人信息保护规则')}}</view>
        <u-icon name="arrow-right"></u-icon>
      </view>
      <view class="list" @click="$.to('/pagesA/pages/my/qualifications')">
				<view>{{$t('平台资质')}}</view>
				<u-icon name="arrow-right"></u-icon>
			</view>
      <!-- <view class="list" @click="$.to('/pages/my/agreement?type=platform_qualification')">
        <view>平台资质</view>
        <u-icon name="arrow-right"></u-icon>
      </view> -->
      <!-- #ifdef APP-PLUS -->
      <view class="banben">{{$t('当前版本')}}{{ currentVersion }}</view>
      <!-- #endif -->
    </view>
  </view>
</template>

<script>
import { app_name } from "@/utils/keyControl.js";
export default {
  data() {
    return {
      appName: "",
      logo: "",
      currentVersion: "1.0.0",
    };
  },
  onLoad() {
    // #ifdef APP-PLUS
    plus.runtime.getProperty(plus.runtime.appid, (info) => {
      console.log("当前版本：", info.version);
      this.currentVersion = info.version; // 将当下版本存到currentVersion字段中去
    });
    // #endif
    this.getName();
  },
  onShow() {
    if (!uni.getStorageSync("user")) {
  	    uni.redirectTo({
  	    	url:'../../pages/my/login'
  	    })
  	}
  },
  methods: {
    getName() {
      this.$http({
        url: "api/common/get_general",
      })
        .then((res) => {
          if (res.data.code == 1) {
            this.appName = res.data.data.app_name;
            this.logo = res.data.data.app_logo;
          }
        })
        .catch((err) => { });
    },
  },
};
</script>

<style>
page {
  background-color: #f3f8fc;
}

.top {
  background: url("../../static/image/vo.webp");
  background-size: cover;
  width: 750rpx;
  display: flex;
  align-items: center;
  justify-content: center;
}

.top image {
  width: 150rpx;
  height: 150rpx;
  border-radius: 30rpx;
}

.box {
  padding: 40rpx 0 60rpx;
  text-align: center;
}

.box .tit {
  font-size: 50rpx;
  font-family: myfont;
  margin-top: 20rpx;
}

.box1 {
  padding: 0 20rpx;
  box-sizing: border-box;
  margin-top: -30rpx;
}

.list {
  background-color: #fff;
  margin: 20rpx auto;
  padding: 34rpx 20rpx;
  box-sizing: border-box;
  border-radius: 10rpx;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.box1 .list:first-child {
  margin-top: 0;
}

.banben {
  text-align: center;
}
</style>
